﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace RTracker.Models.Common
{
    /// <summary>
    /// Class for UserSession, used to get and set values of UserSession properties.
    /// </summary>
    public class CUserSession
    {
        String m_strSessionKey;
        Int64 m_lUserSessionId;
        int m_nUserId;
        int m_nOrganizationId;
        DateTime? m_dtSessionStartTime;
        DateTime? m_dtSessionEndTime;
        int m_nSessionStatus;
        String m_strDevice;
        String m_strIpAddress;
        String m_strOperatingSystem;
        String m_strApplicationUsed;
        String m_strVersion;
        String m_strLocation;
        DateTime? m_dtCreateTimestamp;
        int m_nCreatedBy;
        DateTime? m_dtModifiedTimestamp;
        int m_nModifiedBy;
        Boolean m_bDeleteFlag;
        String m_strUserSessionIds;
        String m_strUserName;
        String m_sLastActionTime;
        /// <summary>
        /// Constructor of the class.
        /// </summary> 
        /// <date_created>10-04-2014</date_created>
        public CUserSession()
        {
            m_strSessionKey = "";
            m_lUserSessionId = 0;
            m_nUserId = 0;
            m_nOrganizationId = 0;
            m_dtSessionStartTime = null;
            m_dtSessionEndTime = null;
            m_nSessionStatus = 0;
            m_strDevice = "";
            m_strIpAddress = "";
            m_strOperatingSystem = "";
            m_strApplicationUsed = "";
            m_strVersion = "";
            m_strLocation = "";
            m_dtCreateTimestamp = null;
            m_nCreatedBy = 0;
            m_dtModifiedTimestamp = null;
            m_nModifiedBy = 0;
            m_bDeleteFlag = false;
            m_strUserSessionIds = "";
            m_strUserName = "";
            m_sLastActionTime = "";
        }

        /// <summary>
        /// Constructor of the class.
        /// </summary> 
        /// <date_created>10-04-2014</date_created>
        public CUserSession(String strSessionKey, Int64 lUserSessionId, int nUserId, int nOrganizationId, DateTime? dtSessionStartTime, DateTime? dtSessionEndTime
            , int nSessionStatus, String strDevice, String strIpAddress, String strOperatingSystem, String strApplicationUsed
            , String strVersion, String strLocation, DateTime? dtCreateTimestamp, int nCreatedBy, DateTime? dtModifiedTimestamp
            , int nModifiedBy, Boolean bDeleteFlag, String strUserSessionIds, String strUserName,  String sLastActionTime)
        {
            m_strSessionKey = strSessionKey;
            m_lUserSessionId = lUserSessionId;
            m_nUserId = nUserId;
            m_nOrganizationId = nOrganizationId;
            m_dtSessionStartTime = dtSessionStartTime;
            m_dtSessionEndTime = dtSessionEndTime;
            m_nSessionStatus = nSessionStatus;
            m_strDevice = strDevice;
            m_strIpAddress = strIpAddress;
            m_strOperatingSystem = strOperatingSystem;
            m_strApplicationUsed = strApplicationUsed;
            m_strVersion = strVersion;
            m_strLocation = strLocation;
            m_dtCreateTimestamp = dtCreateTimestamp;
            m_nCreatedBy = nCreatedBy;
            m_dtModifiedTimestamp = dtModifiedTimestamp;
            m_nModifiedBy = nModifiedBy;
            m_bDeleteFlag = bDeleteFlag;
            m_strUserSessionIds = strUserSessionIds;
            m_strUserName = strUserName;
            m_sLastActionTime = sLastActionTime;
        }

        /// <summary>
        /// Used to store SessionKey
        /// </summary>
        public String SessionKey
        {
            get { return m_strSessionKey; }
            set { m_strSessionKey = value; }
        }
        /// <summary>
        /// Used to store UserSessionId
        /// </summary>
        public Int64 UserSessionId
        {
            get { return m_lUserSessionId; }
            set { m_lUserSessionId = value; }
        }
        /// <summary>
        /// Used to store UserId
        /// </summary>
        public int UserId
        {
            get { return m_nUserId; }
            set { m_nUserId = value; }
        }
        /// <summary>
        /// Used to store OrganizationId
        /// </summary>
        public int OrganizationId
        {
            get { return m_nOrganizationId; }
            set { m_nOrganizationId = value; }
        }
        /// <summary>
        /// Used to store SessionStartTime
        /// </summary>
        public DateTime? SessionStartTime
        {
            get { return m_dtSessionStartTime; }
            set { m_dtSessionStartTime = value; }
        }
        /// <summary>
        /// Used to store SessionEndTime
        /// </summary>
        public DateTime? SessionEndTime
        {
            get { return m_dtSessionEndTime; }
            set { m_dtSessionEndTime = value; }
        }
        /// <summary>
        /// Used to store SessionStatus
        /// </summary>
        public int SessionStatus
        {
            get { return m_nSessionStatus; }
            set { m_nSessionStatus = value; }
        }
        /// <summary>
        /// Used to store Device
        /// </summary>
        public String Device
        {
            get { return m_strDevice; }
            set { m_strDevice = value; }
        }
        /// <summary>
        /// Used to store IpAddress
        /// </summary>
        public String IpAddress
        {
            get { return m_strIpAddress; }
            set { m_strIpAddress = value; }
        }
        /// <summary>
        /// Used to store OperatingSystem
        /// </summary>
        public String OperatingSystem
        {
            get { return m_strOperatingSystem; }
            set { m_strOperatingSystem = value; }
        }
        /// <summary>
        /// Used to store ApplicationUsed
        /// </summary>
        public String ApplicationUsed
        {
            get { return m_strApplicationUsed; }
            set { m_strApplicationUsed = value; }
        }
        /// <summary>
        /// Used to store Version
        /// </summary>
        public String Version
        {
            get { return m_strVersion; }
            set { m_strVersion = value; }
        }
        /// <summary>
        /// Used to store Location
        /// </summary>
        public String Location
        {
            get { return m_strLocation; }
            set { m_strLocation = value; }
        }
        /// <summary>
        /// Used to store CreateTimestamp
        /// </summary>
        public DateTime? CreateTimestamp
        {
            get { return m_dtCreateTimestamp; }
            set { m_dtCreateTimestamp = value; }
        }
        /// <summary>
        /// Used to store CreatedBy
        /// </summary>
        public int CreatedBy
        {
            get { return m_nCreatedBy; }
            set { m_nCreatedBy = value; }
        }
        /// <summary>
        /// Used to store ModifiedTimestamp
        /// </summary>
        public DateTime? ModifiedTimestamp
        {
            get { return m_dtModifiedTimestamp; }
            set { m_dtModifiedTimestamp = value; }
        }
        /// <summary>
        /// Used to store ModifiedBy
        /// </summary>
        public int ModifiedBy
        {
            get { return m_nModifiedBy; }
            set { m_nModifiedBy = value; }
        }
        /// <summary>
        /// Used to store DeleteFlag
        /// </summary>
        public Boolean DeleteFlag
        {
            get { return m_bDeleteFlag; }
            set { m_bDeleteFlag = value; }
        }
        /// <summary>
        /// Used to store UserSessionIds
        /// </summary>
        public String UserSessionIds
        {
            get { return m_strUserSessionIds; }
            set { m_strUserSessionIds = value; }
        }
        /// <summary>
        /// Used to store user Name
        /// </summary>
        public string UserName
        {
            get { return m_strUserName; }
            set { m_strUserName = value; }
        }
        /// <summary>
        /// Used to store Last Action Time
        /// </summary>
        public string LastActionTime
        {
            get { return m_sLastActionTime; }
            set { m_sLastActionTime = value; }
        }
      
    }
}